ResourceLocation (Apache Ant API)

org.apache.tools.ant.types

## Class ResourceLocation

- java.lang.Object
- - org.apache.tools.ant.types.ResourceLocation

- Direct Known Subclasses:
    DTDLocation

      public class ResourceLocation
      extends java.lang.Object

  Helper class to handle the `<dtd>` and `<entity>` nested elements. These correspond to the `PUBLIC` and `URI` catalog entry types, respectively, as defined in the OASIS "Open Catalog" standard.

  Possible Future Enhancements:

  - Bring the Ant element names into conformance with the OASIS standard
  - Add support for additional OASIS catalog entry types
  Since:
    Ant 1.6
  See Also:
    `Catalog`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceLocation()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.URL` | `getBase()`
    `java.lang.String` | `getLocation()`
    `java.lang.String` | `getPublicId()`
    `void` | `setBase(java.net.URL base)`
    `void` | `setLocation(java.lang.String location)`
    `void` | `setPublicId(java.lang.String publicId)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourceLocation

          public ResourceLocation()

  - ### Method Detail

    - #### setPublicId

          public void setPublicId(java.lang.String publicId)

      Parameters:
        `publicId` - uniquely identifies the resource.

    - #### setLocation

          public void setLocation(java.lang.String location)

      Parameters:
        `location` - the location of the resource associated with the publicId.

    - #### setBase

          public void setBase(java.net.URL base)

      Parameters:
        `base` - the base URL of the resource associated with the publicId. If the location specifies a relative URL/pathname, it is resolved using the base. The default base for an external catalog file is the directory in which it is located.

    - #### getPublicId

          public java.lang.String getPublicId()

      Returns:
        the publicId of the resource.

    - #### getLocation

          public java.lang.String getLocation()

      Returns:
        the location of the resource identified by the publicId.

    - #### getBase

          public java.net.URL getBase()

      Returns:
        the base of the resource identified by the publicId.